package com.wn.ticket.web;

import com.wn.ticket.common.ResponseEntity;
import com.wn.ticket.entity.User;
import com.wn.ticket.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @创建人 NST
 * @创建时间 2022/9/12
 * @描述
 */
@RestController
@RequestMapping("/front/user")
public class WebUserController {
    @Autowired
    private UserService userService;

    @RequestMapping("getById")
    public ResponseEntity getById(int id){
        User user = userService.getById(id);
        return new ResponseEntity(user);
    }
}
